package com.yonyou.gmmc.service.shopping.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.yonyou.gmmc.common.annotation.OracleDb;
import com.yonyou.gmmc.service.shopping.model.AddressPo;
import com.yonyou.gmmc.service.shopping.model.TmTpAddress;

import tk.mybatis.mapper.common.Mapper;

@OracleDb
public interface TmTpAddressMapper extends Mapper<TmTpAddress> {
	
	/**
	 * 插入JD地址
	 * @param tmTpAddress
	 */
	void insertAddress(TmTpAddress tmTpAddress);

	/**
	 * 获取父级地址code
	 * @param rankType
	 * @return
	 */
	List<TmTpAddress> queryAddressCode(short rankType);

	/**
	 * 清空表数据
	 */
	void truncateAddress();

	/**
	 * 删除sequence
	 */
	void deleteSEQAdd();

	/**
	 * 创建sequence
	 */
	void createSEQAdd();

	/**
	 * 集合插入
	 * @param addressList
	 */
	void insertJDAddress(List<TmTpAddress> addressList);

	/**
	 * 获取seq
	 * @return
	 */
	List<TmTpAddress> getSeq();

	Long getSeq2();
	
	/**
	 * 获取地址
	 * @param parentCode
	 * @return
	 */
	List<TmTpAddress> queryAddByCode(@Param("parentCode") Long parentCode);
	
	/**
	 * 获取树状地址
	 */
	List<AddressPo> selectAllAdd();
}